﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
namespace Caifu.Fx.Common
{
	public class PageBase : Page
	{
		/// <summary>
		/// PV:Post Value 获取Post访问方式，表单控件的值
		/// </summary>
		/// <param name="controlName">表单控件的名称</param>
		/// <returns>表单控件的值</returns>
		public String PV(String controlName)
		{
			return this.Request.Form[controlName];
		}

		/// <summary>
		/// QV:Query Value:获取Get访问时的查询参数;
		/// </summary>
		/// <param name="queryString">查询变量的名称</param>
		/// <returns></returns>
		public String QV(String queryString)
		{
			return this.Request.QueryString[queryString];
		}

		/// <summary>
		/// 弹出警告消息
		/// </summary>
		/// <param name="message">消息</param>
		public void alert(string message)
		{
			message = "alert('" + message + "');";
			this.ClientScript.RegisterStartupScript(this.GetType(),
				Guid.NewGuid().ToString(), message, true);
		}


		/// <summary>
		/// 调用前段JS脚本
		/// </summary>
		/// <param name="function">js函数名称</param>
		public void CallScript(String function)
		{
			this.ClientScript.RegisterStartupScript(this.GetType(),
			Guid.NewGuid().ToString(), function, true);
		}

		/// <summary>
		/// xia
		/// </summary>
		/// <param name="inputCode"></param>
		/// <returns></returns>
		public Boolean ValidationCode(String inputCode)
		{
			return false;
		}
	}
}
